(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)
;; (setq TeX-auto-save t)
;; (setq TeX-parse-self t)
;; (setq-default TeX-master nil)
(defun my-LaTeX-mode-hook ()
  (define-key LaTeX-mode-map (kbd "TAB") 'TeX-complete-symbol)
  (add-to-list 'TeX-command-list '("XeLaTeX" "xelatex %t" TeX-run-TeX nil t))
  (add-to-list 'TeX-command-list '("DviPdfmx" "dvipdfmx %s.dvi" TeX-run-command nil t))
  (add-to-list 'TeX-command-list '("Pdf" "evince %s.pdf" TeX-run-command nil t))
  (setq TeX-command-default "XeLaTeX")
  (setq TeX-newline-function 'newline-and-indent)
  (setq TeX-save-query  nil )
  (setq TeX-show-compilation t)
  (setq TeX-output-view-style
	(cons '("^pdf$" "." "epdfview %o") TeX-output-view-style)))
;(add-hook 'LaTeX-mode-hook 'turn-on-auto-fill)
(add-hook 'LaTeX-mode-hook 'my-LaTeX-mode-hook)
;(add-hook 'text-mode-hook 'turn-on-auto-fill)
;(load "pi-meta.el")

(provide 'doc)
